package ru.compscicenter.java.calc.operations;

public class DoubleOperations implements Operations<Double>{

	@Override
	public Double parese(String s) {
		double r = 0;
		for (char c : s.toCharArray()) {
			r = r * 10 + c - '0';
		}
		return r;
	}

	@Override
	public Double plus(Double a, Double b) {
		return a + b;
	}

	@Override
	public Double minus(Double a, Double b) {
		return a - b;
	}

	@Override
	public Double mul(Double a, Double b) {
		return a * b;
	}

	@Override
	public Double div(Double a, Double b) {
		return a / b;
	}

}
